﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoMapper;
using Microhard.Protal.Models;
using Microhard.Protal.DataAccess;

namespace Microhard.Protal.DTO
{
    public class ProtalMapBuilder
    {
        public static void InitMap()
        {
            #region Category
            Mapper.CreateMap<CategoryModel, Microhard_Category>();
            Mapper.CreateMap<Microhard_Category, CategoryModel>();
            #endregion

            #region SiteInfo
            Mapper.CreateMap<SiteInfoModel, Microhard_SiteInfo>();
            Mapper.CreateMap<Microhard_SiteInfo, SiteInfoModel>();
            #endregion

            #region Product
            Mapper.CreateMap<ProductModel, Microhard_Product>();
            Mapper.CreateMap<Microhard_Product, ProductModel>();
            #endregion

            #region Article
            Mapper.CreateMap<ArticleModel, Microhard_Article>();
            Mapper.CreateMap<Microhard_Article, ArticleModel>();
            #endregion

            #region Attachment
            Mapper.CreateMap<AttachmentModel, Attachment>();
            Mapper.CreateMap<Attachment, AttachmentModel>();
            #endregion

            #region Service
            Mapper.CreateMap<ServiceModel,Microhard_CustomerService>();
            Mapper.CreateMap<Microhard_CustomerService, ServiceModel>();
            #endregion
        }
    }
}
